home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
batchut
/
rap101.zip
/
MENUCOL.RAP
< prev
next >
Wrap
Text File
|
1988-11-01
|
2KB
|
107 lines
;menucol.rap - demonstrating advanced menu features
;rs 11-1-88
if $screentype <> "ansi"
t:Sorry... you'll need the ANSI.SYS driver installed for this program.
bye
end if
$reverse=*chr(27)[7m
$norm=*chr(27)[0m
$month[1]=January
$month[2]=February
$month[3]=March
$month[4]=April
$month[5]=May
$month[6]=June
$month[7]=July
$month[8]=August
$month[9]=September
$month[10]=October
$month[11]=November
$month[12]=December
menu
cls
t:Month selection: pick by typing unique part of name (and Enter)
option accept("Ja.*"): *dispname(1)
#choice=1
option accept("F.*"): *dispname(2)
#choice=2
option accept("Mar.*"): *dispname(3)
#choice=3
option accept("Ap.*"): *dispname(4)
#choice=4
option accept("May"): *dispname(5)
#choice=5
option accept("Jun.*"): *dispname(6)
#choice=6
option accept("Jul.*"): *dispname(7)
#choice=7
option accept("Au.*"): *dispname(8)
#choice=8
option accept("S.*"): *dispname(9)
#choice=9
option accept("O.*"): *dispname(10)
#choice=10
option accept("N.*"): *dispname(11)
#choice=11
option accept("D.*"): *dispname(12)
#choice=12
option accept("j","ju","m","ma","a")
t:*go(7,3) Not enough...
pause 5
repeat
end menu: *go(7,3) Pick a month:$blank
th:*gospot(#choice)$reverse$month[#choice]$norm
ca 7,1
cl
t:Thank you.
foot
run
str function *blanks(#n)
declare $manyblank= $blank_
return *mid($manyblank,1,#n)
end function
str function *go(#row,#col)
return "*chr(27)[#row;#col\H"
end function
string function *gospot(#n)
declare #row,#col
#row = (#n-1) mod 3 + 3
#col = (#n-1) / 3 * 20 + 2
return "*chr(27)[#row;#col\H"
end function
string function *dispname(#n)
return "*gospot(#n)$month[#n]"
end function